// Font/FontTypes.h

#ifndef _FONT_FontTypes_H_
#define _FONT_FontTypes_H_

#ifndef _CORE_std_H_
#include <core/std.h>
#endif

// Define
#define FONT_MAX_TEXTUREPAGES		( 8 )

namespace FONT
{

struct charInfo
{
	uint32_t	id;
	uint16_t	x;
	uint16_t	y;
	uint16_t	width;
	uint16_t	height;
	int16_t		xoffset;
	int16_t		yoffset;
	int16_t		xadvance;
	uint8_t		page;
	uint8_t		chnl;
};

struct infoBlock
{ 
	uint16_t	fontSize;
	uint8_t		reserved:4;
	uint8_t		bold    :1; 
	uint8_t		italic  :1;
	uint8_t		unicode :1;
	uint8_t		smooth  :1;
	uint8_t		charSet; 
	uint16_t	stretchH;
	uint8_t		aa;
	uint8_t		paddingUp;
	uint8_t		paddingRight;
	uint8_t		paddingDown;
	uint8_t		paddingLeft;
	uint8_t		spacingHoriz;
	uint8_t		spacingVert;
	uint8_t		outline;         // Added with version 2
	char		fontName[1];
};

struct commonBlock
{
    uint16_t 	lineHeight;
    uint16_t 	base;
    uint16_t 	scaleW;
    uint16_t 	scaleH;
    uint16_t 	pages;
    uint8_t 	packed  :1;
    uint8_t 	reserved:7;
	uint8_t 	alphaChnl;
	uint8_t 	redChnl;
	uint8_t 	greenChnl;
	uint8_t 	blueChnl;
};

struct kerningPair
{
    uint16_t	first;
    uint16_t	second;
    int16_t		amount;
};

}; // namespace FONT

#endif